package com.gitee.loyo.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 地锁状态
 */
@Getter
@AllArgsConstructor
public enum StartChargeSeqStat {
    STARTING(1, "启动中"), CHARGING(2, "充电中"), STOPPING(3, "停止中"), END(4, "已结束"), UNKNOWN(5, "未知");

    private int code;
    private String text;

    public static StartChargeSeqStat valueOf(int code){
        switch (code){
            case 1: return UNKNOWN;
            case 2: return CHARGING;
            case 3: return STOPPING;
            case 4: return END;
            case 5: return UNKNOWN;
        }
        throw new UnsupportedOperationException("unknown code: " + code);
    }
}
